﻿using System;
using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Spreadsheet;
using DocumentFormat.OpenXml.Drawing;
using DocumentFormat.OpenXml.ExtendedProperties;
using DocumentFormat.OpenXml.VariantTypes;
using BottomBorder = DocumentFormat.OpenXml.Spreadsheet.BottomBorder;
using Fill = DocumentFormat.OpenXml.Spreadsheet.Fill;
using FontScheme = DocumentFormat.OpenXml.Spreadsheet.FontScheme;
using Fonts = DocumentFormat.OpenXml.Spreadsheet.Fonts;
using GradientFill = DocumentFormat.OpenXml.Drawing.GradientFill;
using GradientStop = DocumentFormat.OpenXml.Drawing.GradientStop;
using Hyperlink = DocumentFormat.OpenXml.Drawing.Hyperlink;
using LeftBorder = DocumentFormat.OpenXml.Spreadsheet.LeftBorder;
using Outline = DocumentFormat.OpenXml.Drawing.Outline;
using PatternFill = DocumentFormat.OpenXml.Spreadsheet.PatternFill;
using RightBorder = DocumentFormat.OpenXml.Spreadsheet.RightBorder;
using TopBorder = DocumentFormat.OpenXml.Spreadsheet.TopBorder;

namespace eCommerce.db.Excel
{
    /// <summary>
    /// This code was generated using the productivity tool included with
    /// the OpenXML SDK v2.0 Tools package.
    /// </summary>
    public class ExcelDocument
    {
        // Creates a SpreadsheetDocument.
        public void CreatePackage(string filePath)
        {
            using (SpreadsheetDocument package = SpreadsheetDocument.Create(filePath, SpreadsheetDocumentType.Workbook))
            {
                CreateParts(package);
            }
        }

        // Adds child parts and generates content of the specified part.
        private void CreateParts(SpreadsheetDocument document)
        {
            ExtendedFilePropertiesPart extendedFilePropertiesPart1 = document.AddNewPart<ExtendedFilePropertiesPart>("rId3");
            GenerateExtendedFilePropertiesPart1Content(extendedFilePropertiesPart1);

            WorkbookPart workbookPart1 = document.AddWorkbookPart();
            GenerateWorkbookPart1Content(workbookPart1);

            WorksheetPart worksheetPart1 = workbookPart1.AddNewPart<WorksheetPart>("rId3");
            GenerateWorksheetPart1Content(worksheetPart1);

            WorksheetPart worksheetPart2 = workbookPart1.AddNewPart<WorksheetPart>("rId2");
            GenerateWorksheetPart2Content(worksheetPart2);

            WorksheetPart worksheetPart3 = workbookPart1.AddNewPart<WorksheetPart>("rId1");
            GenerateWorksheetPart3Content(worksheetPart3);

            WorkbookStylesPart workbookStylesPart1 = workbookPart1.AddNewPart<WorkbookStylesPart>("rId5");
            GenerateWorkbookStylesPart1Content(workbookStylesPart1);

            ThemePart themePart1 = workbookPart1.AddNewPart<ThemePart>("rId4");
            GenerateThemePart1Content(themePart1);

            SetPackageProperties(document);
        }

        // Generates content of extendedFilePropertiesPart1.
        private void GenerateExtendedFilePropertiesPart1Content(ExtendedFilePropertiesPart extendedFilePropertiesPart1)
        {
            Properties properties1 = new Properties();
            Application application1 = new Application();
            application1.Text = "Microsoft Excel";
            DocumentSecurity documentSecurity1 = new DocumentSecurity();
            documentSecurity1.Text = "0";
            ScaleCrop scaleCrop1 = new ScaleCrop();
            scaleCrop1.Text = "false";

            HeadingPairs headingPairs1 = new HeadingPairs();

            VTVector vTVector1 = new VTVector() { BaseType = VectorBaseValues.Variant, Size = (UInt32Value)2U };

            Variant variant1 = new Variant();
            VTLPSTR vTLPSTR1 = new VTLPSTR();
            vTLPSTR1.Text = "Worksheets";

            variant1.Append(vTLPSTR1);

            Variant variant2 = new Variant();
            VTInt32 vTInt321 = new VTInt32();
            vTInt321.Text = "3";

            variant2.Append(vTInt321);

            vTVector1.Append(variant1);
            vTVector1.Append(variant2);

            headingPairs1.Append(vTVector1);

            TitlesOfParts titlesOfParts1 = new TitlesOfParts();

            VTVector vTVector2 = new VTVector() { BaseType = VectorBaseValues.Lpstr, Size = (UInt32Value)3U };
            VTLPSTR vTLPSTR2 = new VTLPSTR();
            vTLPSTR2.Text = "Sheet1";
            VTLPSTR vTLPSTR3 = new VTLPSTR();
            vTLPSTR3.Text = "Sheet2";
            VTLPSTR vTLPSTR4 = new VTLPSTR();
            vTLPSTR4.Text = "Sheet3";

            vTVector2.Append(vTLPSTR2);
            vTVector2.Append(vTLPSTR3);
            vTVector2.Append(vTLPSTR4);

            titlesOfParts1.Append(vTVector2);
            Company company1 = new Company();
            company1.Text = "None";
            LinksUpToDate linksUpToDate1 = new LinksUpToDate();
            linksUpToDate1.Text = "false";
            SharedDocument sharedDocument1 = new SharedDocument();
            sharedDocument1.Text = "false";
            HyperlinksChanged hyperlinksChanged1 = new HyperlinksChanged();
            hyperlinksChanged1.Text = "false";
            ApplicationVersion applicationVersion1 = new ApplicationVersion();
            applicationVersion1.Text = "12.0000";

            properties1.Append(application1);
            properties1.Append(documentSecurity1);
            properties1.Append(scaleCrop1);
            properties1.Append(headingPairs1);
            properties1.Append(titlesOfParts1);
            properties1.Append(company1);
            properties1.Append(linksUpToDate1);
            properties1.Append(sharedDocument1);
            properties1.Append(hyperlinksChanged1);
            properties1.Append(applicationVersion1);

            extendedFilePropertiesPart1.Properties = properties1;
        }

        // Generates content of workbookPart1.
        private void GenerateWorkbookPart1Content(WorkbookPart workbookPart1)
        {
            Workbook workbook1 = new Workbook();
            FileVersion fileVersion1 = new FileVersion() { ApplicationName = "xl", LastEdited = "4", LowestEdited = "4", BuildVersion = "4506" };
            WorkbookProperties workbookProperties1 = new WorkbookProperties() { DefaultThemeVersion = (UInt32Value)124226U };

            BookViews bookViews1 = new BookViews();
            WorkbookView workbookView1 = new WorkbookView() { XWindow = 0, YWindow = 45, WindowWidth = (UInt32Value)19155U, WindowHeight = (UInt32Value)11820U };

            bookViews1.Append(workbookView1);

            Sheets sheets1 = new Sheets();
            Sheet sheet1 = new Sheet() { Name = "Sheet1", SheetId = (UInt32Value)1U, Id = "rId1" };
            Sheet sheet2 = new Sheet() { Name = "Sheet2", SheetId = (UInt32Value)2U, Id = "rId2" };
            Sheet sheet3 = new Sheet() { Name = "Sheet3", SheetId = (UInt32Value)3U, Id = "rId3" };

            sheets1.Append(sheet1);
            sheets1.Append(sheet2);
            sheets1.Append(sheet3);
            CalculationProperties calculationProperties1 = new CalculationProperties() { CalculationId = (UInt32Value)125725U };

            workbook1.Append(fileVersion1);
            workbook1.Append(workbookProperties1);
            workbook1.Append(bookViews1);
            workbook1.Append(sheets1);
            workbook1.Append(calculationProperties1);

            workbookPart1.Workbook = workbook1;
        }

        // Generates content of worksheetPart1.
        private void GenerateWorksheetPart1Content(WorksheetPart worksheetPart1)
        {
            Worksheet worksheet1 = new Worksheet();
            SheetDimension sheetDimension1 = new SheetDimension() { Reference = "A1" };

            SheetViews sheetViews1 = new SheetViews();
            SheetView sheetView1 = new SheetView() { WorkbookViewId = (UInt32Value)0U };

            sheetViews1.Append(sheetView1);
            SheetFormatProperties sheetFormatProperties1 = new SheetFormatProperties() { DefaultRowHeight = 15D };
            SheetData sheetData1 = new SheetData();
            PageMargins pageMargins1 = new PageMargins() { Left = 0.7D, Right = 0.7D, Top = 0.75D, Bottom = 0.75D, Header = 0.3D, Footer = 0.3D };

            worksheet1.Append(sheetDimension1);
            worksheet1.Append(sheetViews1);
            worksheet1.Append(sheetFormatProperties1);
            worksheet1.Append(sheetData1);
            worksheet1.Append(pageMargins1);

            worksheetPart1.Worksheet = worksheet1;
        }

        // Generates content of worksheetPart2.
        private void GenerateWorksheetPart2Content(WorksheetPart worksheetPart2)
        {
            Worksheet worksheet2 = new Worksheet();
            SheetDimension sheetDimension2 = new SheetDimension() { Reference = "A1" };

            SheetViews sheetViews2 = new SheetViews();
            SheetView sheetView2 = new SheetView() { WorkbookViewId = (UInt32Value)0U };

            sheetViews2.Append(sheetView2);
            SheetFormatProperties sheetFormatProperties2 = new SheetFormatProperties() { DefaultRowHeight = 15D };
            SheetData sheetData2 = new SheetData();
            PageMargins pageMargins2 = new PageMargins() { Left = 0.7D, Right = 0.7D, Top = 0.75D, Bottom = 0.75D, Header = 0.3D, Footer = 0.3D };

            worksheet2.Append(sheetDimension2);
            worksheet2.Append(sheetViews2);
            worksheet2.Append(sheetFormatProperties2);
            worksheet2.Append(sheetData2);
            worksheet2.Append(pageMargins2);

            worksheetPart2.Worksheet = worksheet2;
        }

        // Generates content of worksheetPart3.
        private void GenerateWorksheetPart3Content(WorksheetPart worksheetPart3)
        {
            Worksheet worksheet3 = new Worksheet();
            SheetDimension sheetDimension3 = new SheetDimension() { Reference = "A1" };

            SheetViews sheetViews3 = new SheetViews();
            SheetView sheetView3 = new SheetView() { TabSelected = true, WorkbookViewId = (UInt32Value)0U };

            sheetViews3.Append(sheetView3);
            SheetFormatProperties sheetFormatProperties3 = new SheetFormatProperties() { DefaultRowHeight = 15D };
            SheetData sheetData3 = new SheetData();
            PageMargins pageMargins3 = new PageMargins() { Left = 0.7D, Right = 0.7D, Top = 0.75D, Bottom = 0.75D, Header = 0.3D, Footer = 0.3D };

            worksheet3.Append(sheetDimension3);
            worksheet3.Append(sheetViews3);
            worksheet3.Append(sheetFormatProperties3);
            worksheet3.Append(sheetData3);
            worksheet3.Append(pageMargins3);

            worksheetPart3.Worksheet = worksheet3;
        }

        // Generates content of workbookStylesPart1.
        private void GenerateWorkbookStylesPart1Content(WorkbookStylesPart workbookStylesPart1)
        {
            Stylesheet stylesheet1 = new Stylesheet();

            Fonts fonts1 = new Fonts() { Count = (UInt32Value)1U };

            Font font1 = new Font();
            FontSize fontSize1 = new FontSize() { Val = 11D };
            Color color1 = new Color() { Theme = (UInt32Value)1U };
            FontName fontName1 = new FontName() { Val = "Calibri" };
            FontFamilyNumbering fontFamilyNumbering1 = new FontFamilyNumbering() { Val = 2 };
            FontScheme fontScheme1 = new FontScheme() { Val = FontSchemeValues.Minor };

            font1.Append(fontSize1);
            font1.Append(color1);
            font1.Append(fontName1);
            font1.Append(fontFamilyNumbering1);
            font1.Append(fontScheme1);

            fonts1.Append(font1);

            Fills fills1 = new Fills() { Count = (UInt32Value)2U };

            Fill fill1 = new Fill();
            PatternFill patternFill1 = new PatternFill() { PatternType = PatternValues.None };

            fill1.Append(patternFill1);

            Fill fill2 = new Fill();
            PatternFill patternFill2 = new PatternFill() { PatternType = PatternValues.Gray125 };

            fill2.Append(patternFill2);

            fills1.Append(fill1);
            fills1.Append(fill2);

            Borders borders1 = new Borders() { Count = (UInt32Value)1U };

            Border border1 = new Border();
            LeftBorder leftBorder1 = new LeftBorder();
            RightBorder rightBorder1 = new RightBorder();
            TopBorder topBorder1 = new TopBorder();
            BottomBorder bottomBorder1 = new BottomBorder();
            DiagonalBorder diagonalBorder1 = new DiagonalBorder();

            border1.Append(leftBorder1);
            border1.Append(rightBorder1);
            border1.Append(topBorder1);
            border1.Append(bottomBorder1);
            border1.Append(diagonalBorder1);

            borders1.Append(border1);

            CellStyleFormats cellStyleFormats1 = new CellStyleFormats() { Count = (UInt32Value)1U };
            CellFormat cellFormat1 = new CellFormat() { NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U };

            cellStyleFormats1.Append(cellFormat1);

            CellFormats cellFormats1 = new CellFormats() { Count = (UInt32Value)1U };
            CellFormat cellFormat2 = new CellFormat() { NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U };

            cellFormats1.Append(cellFormat2);

            CellStyles cellStyles1 = new CellStyles() { Count = (UInt32Value)1U };
            CellStyle cellStyle1 = new CellStyle() { Name = "Normal", FormatId = (UInt32Value)0U, BuiltinId = (UInt32Value)0U };

            cellStyles1.Append(cellStyle1);
            DifferentialFormats differentialFormats1 = new DifferentialFormats() { Count = (UInt32Value)0U };
            TableStyles tableStyles1 = new TableStyles() { Count = (UInt32Value)0U, DefaultTableStyle = "TableStyleMedium9", DefaultPivotStyle = "PivotStyleLight16" };

            stylesheet1.Append(fonts1);
            stylesheet1.Append(fills1);
            stylesheet1.Append(borders1);
            stylesheet1.Append(cellStyleFormats1);
            stylesheet1.Append(cellFormats1);
            stylesheet1.Append(cellStyles1);
            stylesheet1.Append(differentialFormats1);
            stylesheet1.Append(tableStyles1);

            workbookStylesPart1.Stylesheet = stylesheet1;
        }

        // Generates content of themePart1.
        private void GenerateThemePart1Content(ThemePart themePart1)
        {
            Theme theme1 = new Theme() { Name = "Office Theme" };

            ThemeElements themeElements1 = new ThemeElements();

            ColorScheme colorScheme1 = new ColorScheme() { Name = "Office" };

            Dark1Color dark1Color1 = new Dark1Color();
            SystemColor systemColor1 = new SystemColor() { Val = SystemColorValues.WindowText, LastColor = "000000" };

            dark1Color1.Append(systemColor1);

            Light1Color light1Color1 = new Light1Color();
            SystemColor systemColor2 = new SystemColor() { Val = SystemColorValues.Window, LastColor = "FFFFFF" };

            light1Color1.Append(systemColor2);

            Dark2Color dark2Color1 = new Dark2Color();
            RgbColorModelHex rgbColorModelHex1 = new RgbColorModelHex() { Val = "1F497D" };

            dark2Color1.Append(rgbColorModelHex1);

            Light2Color light2Color1 = new Light2Color();
            RgbColorModelHex rgbColorModelHex2 = new RgbColorModelHex() { Val = "EEECE1" };

            light2Color1.Append(rgbColorModelHex2);

            Accent1Color accent1Color1 = new Accent1Color();
            RgbColorModelHex rgbColorModelHex3 = new RgbColorModelHex() { Val = "4F81BD" };

            accent1Color1.Append(rgbColorModelHex3);

            Accent2Color accent2Color1 = new Accent2Color();
            RgbColorModelHex rgbColorModelHex4 = new RgbColorModelHex() { Val = "C0504D" };

            accent2Color1.Append(rgbColorModelHex4);

            Accent3Color accent3Color1 = new Accent3Color();
            RgbColorModelHex rgbColorModelHex5 = new RgbColorModelHex() { Val = "9BBB59" };

            accent3Color1.Append(rgbColorModelHex5);

            Accent4Color accent4Color1 = new Accent4Color();
            RgbColorModelHex rgbColorModelHex6 = new RgbColorModelHex() { Val = "8064A2" };

            accent4Color1.Append(rgbColorModelHex6);

            Accent5Color accent5Color1 = new Accent5Color();
            RgbColorModelHex rgbColorModelHex7 = new RgbColorModelHex() { Val = "4BACC6" };

            accent5Color1.Append(rgbColorModelHex7);

            Accent6Color accent6Color1 = new Accent6Color();
            RgbColorModelHex rgbColorModelHex8 = new RgbColorModelHex() { Val = "F79646" };

            accent6Color1.Append(rgbColorModelHex8);

            Hyperlink hyperlink1 = new Hyperlink();
            RgbColorModelHex rgbColorModelHex9 = new RgbColorModelHex() { Val = "0000FF" };

            hyperlink1.Append(rgbColorModelHex9);

            FollowedHyperlinkColor followedHyperlinkColor1 = new FollowedHyperlinkColor();
            RgbColorModelHex rgbColorModelHex10 = new RgbColorModelHex() { Val = "800080" };

            followedHyperlinkColor1.Append(rgbColorModelHex10);

            colorScheme1.Append(dark1Color1);
            colorScheme1.Append(light1Color1);
            colorScheme1.Append(dark2Color1);
            colorScheme1.Append(light2Color1);
            colorScheme1.Append(accent1Color1);
            colorScheme1.Append(accent2Color1);
            colorScheme1.Append(accent3Color1);
            colorScheme1.Append(accent4Color1);
            colorScheme1.Append(accent5Color1);
            colorScheme1.Append(accent6Color1);
            colorScheme1.Append(hyperlink1);
            colorScheme1.Append(followedHyperlinkColor1);

            DocumentFormat.OpenXml.Drawing.FontScheme fontScheme2 = new DocumentFormat.OpenXml.Drawing.FontScheme() { Name = "Office" };

            MajorFont majorFont1 = new MajorFont();
            LatinFont latinFont1 = new LatinFont() { Typeface = "Cambria" };
            EastAsianFont eastAsianFont1 = new EastAsianFont() { Typeface = "" };
            ComplexScriptFont complexScriptFont1 = new ComplexScriptFont() { Typeface = "" };
            SupplementalFont supplementalFont1 = new SupplementalFont() { Script = "Jpan", Typeface = "ＭＳ Ｐゴシック" };
            SupplementalFont supplementalFont2 = new SupplementalFont() { Script = "Hang", Typeface = "맑은 고딕" };
            SupplementalFont supplementalFont3 = new SupplementalFont() { Script = "Hans", Typeface = "宋体" };
            SupplementalFont supplementalFont4 = new SupplementalFont() { Script = "Hant", Typeface = "新細明體" };
            SupplementalFont supplementalFont5 = new SupplementalFont() { Script = "Arab", Typeface = "Times New Roman" };
            SupplementalFont supplementalFont6 = new SupplementalFont() { Script = "Hebr", Typeface = "Times New Roman" };
            SupplementalFont supplementalFont7 = new SupplementalFont() { Script = "Thai", Typeface = "Tahoma" };
            SupplementalFont supplementalFont8 = new SupplementalFont() { Script = "Ethi", Typeface = "Nyala" };
            SupplementalFont supplementalFont9 = new SupplementalFont() { Script = "Beng", Typeface = "Vrinda" };
            SupplementalFont supplementalFont10 = new SupplementalFont() { Script = "Gujr", Typeface = "Shruti" };
            SupplementalFont supplementalFont11 = new SupplementalFont() { Script = "Khmr", Typeface = "MoolBoran" };
            SupplementalFont supplementalFont12 = new SupplementalFont() { Script = "Knda", Typeface = "Tunga" };
            SupplementalFont supplementalFont13 = new SupplementalFont() { Script = "Guru", Typeface = "Raavi" };
            SupplementalFont supplementalFont14 = new SupplementalFont() { Script = "Cans", Typeface = "Euphemia" };
            SupplementalFont supplementalFont15 = new SupplementalFont() { Script = "Cher", Typeface = "Plantagenet Cherokee" };
            SupplementalFont supplementalFont16 = new SupplementalFont() { Script = "Yiii", Typeface = "Microsoft Yi Baiti" };
            SupplementalFont supplementalFont17 = new SupplementalFont() { Script = "Tibt", Typeface = "Microsoft Himalaya" };
            SupplementalFont supplementalFont18 = new SupplementalFont() { Script = "Thaa", Typeface = "MV Boli" };
            SupplementalFont supplementalFont19 = new SupplementalFont() { Script = "Deva", Typeface = "Mangal" };
            SupplementalFont supplementalFont20 = new SupplementalFont() { Script = "Telu", Typeface = "Gautami" };
            SupplementalFont supplementalFont21 = new SupplementalFont() { Script = "Taml", Typeface = "Latha" };
            SupplementalFont supplementalFont22 = new SupplementalFont() { Script = "Syrc", Typeface = "Estrangelo Edessa" };
            SupplementalFont supplementalFont23 = new SupplementalFont() { Script = "Orya", Typeface = "Kalinga" };
            SupplementalFont supplementalFont24 = new SupplementalFont() { Script = "Mlym", Typeface = "Kartika" };
            SupplementalFont supplementalFont25 = new SupplementalFont() { Script = "Laoo", Typeface = "DokChampa" };
            SupplementalFont supplementalFont26 = new SupplementalFont() { Script = "Sinh", Typeface = "Iskoola Pota" };
            SupplementalFont supplementalFont27 = new SupplementalFont() { Script = "Mong", Typeface = "Mongolian Baiti" };
            SupplementalFont supplementalFont28 = new SupplementalFont() { Script = "Viet", Typeface = "Times New Roman" };
            SupplementalFont supplementalFont29 = new SupplementalFont() { Script = "Uigh", Typeface = "Microsoft Uighur" };

            majorFont1.Append(latinFont1);
            majorFont1.Append(eastAsianFont1);
            majorFont1.Append(complexScriptFont1);
            majorFont1.Append(supplementalFont1);
            majorFont1.Append(supplementalFont2);
            majorFont1.Append(supplementalFont3);
            majorFont1.Append(supplementalFont4);
            majorFont1.Append(supplementalFont5);
            majorFont1.Append(supplementalFont6);
            majorFont1.Append(supplementalFont7);
            majorFont1.Append(supplementalFont8);
            majorFont1.Append(supplementalFont9);
            majorFont1.Append(supplementalFont10);
            majorFont1.Append(supplementalFont11);
            majorFont1.Append(supplementalFont12);
            majorFont1.Append(supplementalFont13);
            majorFont1.Append(supplementalFont14);
            majorFont1.Append(supplementalFont15);
            majorFont1.Append(supplementalFont16);
            majorFont1.Append(supplementalFont17);
            majorFont1.Append(supplementalFont18);
            majorFont1.Append(supplementalFont19);
            majorFont1.Append(supplementalFont20);
            majorFont1.Append(supplementalFont21);
            majorFont1.Append(supplementalFont22);
            majorFont1.Append(supplementalFont23);
            majorFont1.Append(supplementalFont24);
            majorFont1.Append(supplementalFont25);
            majorFont1.Append(supplementalFont26);
            majorFont1.Append(supplementalFont27);
            majorFont1.Append(supplementalFont28);
            majorFont1.Append(supplementalFont29);

            MinorFont minorFont1 = new MinorFont();
            LatinFont latinFont2 = new LatinFont() { Typeface = "Calibri" };
            EastAsianFont eastAsianFont2 = new EastAsianFont() { Typeface = "" };
            ComplexScriptFont complexScriptFont2 = new ComplexScriptFont() { Typeface = "" };
            SupplementalFont supplementalFont30 = new SupplementalFont() { Script = "Jpan", Typeface = "ＭＳ Ｐゴシック" };
            SupplementalFont supplementalFont31 = new SupplementalFont() { Script = "Hang", Typeface = "맑은 고딕" };
            SupplementalFont supplementalFont32 = new SupplementalFont() { Script = "Hans", Typeface = "宋体" };
            SupplementalFont supplementalFont33 = new SupplementalFont() { Script = "Hant", Typeface = "新細明體" };
            SupplementalFont supplementalFont34 = new SupplementalFont() { Script = "Arab", Typeface = "Arial" };
            SupplementalFont supplementalFont35 = new SupplementalFont() { Script = "Hebr", Typeface = "Arial" };
            SupplementalFont supplementalFont36 = new SupplementalFont() { Script = "Thai", Typeface = "Tahoma" };
            SupplementalFont supplementalFont37 = new SupplementalFont() { Script = "Ethi", Typeface = "Nyala" };
            SupplementalFont supplementalFont38 = new SupplementalFont() { Script = "Beng", Typeface = "Vrinda" };
            SupplementalFont supplementalFont39 = new SupplementalFont() { Script = "Gujr", Typeface = "Shruti" };
            SupplementalFont supplementalFont40 = new SupplementalFont() { Script = "Khmr", Typeface = "DaunPenh" };
            SupplementalFont supplementalFont41 = new SupplementalFont() { Script = "Knda", Typeface = "Tunga" };
            SupplementalFont supplementalFont42 = new SupplementalFont() { Script = "Guru", Typeface = "Raavi" };
            SupplementalFont supplementalFont43 = new SupplementalFont() { Script = "Cans", Typeface = "Euphemia" };
            SupplementalFont supplementalFont44 = new SupplementalFont() { Script = "Cher", Typeface = "Plantagenet Cherokee" };
            SupplementalFont supplementalFont45 = new SupplementalFont() { Script = "Yiii", Typeface = "Microsoft Yi Baiti" };
            SupplementalFont supplementalFont46 = new SupplementalFont() { Script = "Tibt", Typeface = "Microsoft Himalaya" };
            SupplementalFont supplementalFont47 = new SupplementalFont() { Script = "Thaa", Typeface = "MV Boli" };
            SupplementalFont supplementalFont48 = new SupplementalFont() { Script = "Deva", Typeface = "Mangal" };
            SupplementalFont supplementalFont49 = new SupplementalFont() { Script = "Telu", Typeface = "Gautami" };
            SupplementalFont supplementalFont50 = new SupplementalFont() { Script = "Taml", Typeface = "Latha" };
            SupplementalFont supplementalFont51 = new SupplementalFont() { Script = "Syrc", Typeface = "Estrangelo Edessa" };
            SupplementalFont supplementalFont52 = new SupplementalFont() { Script = "Orya", Typeface = "Kalinga" };
            SupplementalFont supplementalFont53 = new SupplementalFont() { Script = "Mlym", Typeface = "Kartika" };
            SupplementalFont supplementalFont54 = new SupplementalFont() { Script = "Laoo", Typeface = "DokChampa" };
            SupplementalFont supplementalFont55 = new SupplementalFont() { Script = "Sinh", Typeface = "Iskoola Pota" };
            SupplementalFont supplementalFont56 = new SupplementalFont() { Script = "Mong", Typeface = "Mongolian Baiti" };
            SupplementalFont supplementalFont57 = new SupplementalFont() { Script = "Viet", Typeface = "Arial" };
            SupplementalFont supplementalFont58 = new SupplementalFont() { Script = "Uigh", Typeface = "Microsoft Uighur" };

            minorFont1.Append(latinFont2);
            minorFont1.Append(eastAsianFont2);
            minorFont1.Append(complexScriptFont2);
            minorFont1.Append(supplementalFont30);
            minorFont1.Append(supplementalFont31);
            minorFont1.Append(supplementalFont32);
            minorFont1.Append(supplementalFont33);
            minorFont1.Append(supplementalFont34);
            minorFont1.Append(supplementalFont35);
            minorFont1.Append(supplementalFont36);
            minorFont1.Append(supplementalFont37);
            minorFont1.Append(supplementalFont38);
            minorFont1.Append(supplementalFont39);
            minorFont1.Append(supplementalFont40);
            minorFont1.Append(supplementalFont41);
            minorFont1.Append(supplementalFont42);
            minorFont1.Append(supplementalFont43);
            minorFont1.Append(supplementalFont44);
            minorFont1.Append(supplementalFont45);
            minorFont1.Append(supplementalFont46);
            minorFont1.Append(supplementalFont47);
            minorFont1.Append(supplementalFont48);
            minorFont1.Append(supplementalFont49);
            minorFont1.Append(supplementalFont50);
            minorFont1.Append(supplementalFont51);
            minorFont1.Append(supplementalFont52);
            minorFont1.Append(supplementalFont53);
            minorFont1.Append(supplementalFont54);
            minorFont1.Append(supplementalFont55);
            minorFont1.Append(supplementalFont56);
            minorFont1.Append(supplementalFont57);
            minorFont1.Append(supplementalFont58);

            fontScheme2.Append(majorFont1);
            fontScheme2.Append(minorFont1);

            FormatScheme formatScheme1 = new FormatScheme() { Name = "Office" };

            FillStyleList fillStyleList1 = new FillStyleList();

            SolidFill solidFill1 = new SolidFill();
            SchemeColor schemeColor1 = new SchemeColor() { Val = SchemeColorValues.PhColor };

            solidFill1.Append(schemeColor1);

            GradientFill gradientFill1 = new GradientFill() { RotateWithShape = true };

            GradientStopList gradientStopList1 = new GradientStopList();

            GradientStop gradientStop1 = new GradientStop() { Position = 0 };

            SchemeColor schemeColor2 = new SchemeColor() { Val = SchemeColorValues.PhColor };
            Tint tint1 = new Tint() { Val = 50000 };
            SaturationModulation saturationModulation1 = new SaturationModulation() { Val = 300000 };

            schemeColor2.Append(tint1);
            schemeColor2.Append(saturationModulation1);

            gradientStop1.Append(schemeColor2);

            GradientStop gradientStop2 = new GradientStop() { Position = 35000 };

            SchemeColor schemeColor3 = new SchemeColor() { Val = SchemeColorValues.PhColor };
            Tint tint2 = new Tint() { Val = 37000 };
            SaturationModulation saturationModulation2 = new SaturationModulation() { Val = 300000 };

            schemeColor3.Append(tint2);
            schemeColor3.Append(saturationModulation2);

            gradientStop2.Append(schemeColor3);

            GradientStop gradientStop3 = new GradientStop() { Position = 100000 };

            SchemeColor schemeColor4 = new SchemeColor() { Val = SchemeColorValues.PhColor };
            Tint tint3 = new Tint() { Val = 15000 };
            SaturationModulation saturationModulation3 = new SaturationModulation() { Val = 350000 };

            schemeColor4.Append(tint3);
            schemeColor4.Append(saturationModulation3);

            gradientStop3.Append(schemeColor4);

            gradientStopList1.Append(gradientStop1);
            gradientStopList1.Append(gradientStop2);
            gradientStopList1.Append(gradientStop3);
            LinearGradientFill linearGradientFill1 = new LinearGradientFill() { Angle = 16200000, Scaled = true };

            gradientFill1.Append(gradientStopList1);
            gradientFill1.Append(linearGradientFill1);

            GradientFill gradientFill2 = new GradientFill() { RotateWithShape = true };

            GradientStopList gradientStopList2 = new GradientStopList();

            GradientStop gradientStop4 = new GradientStop() { Position = 0 };

            SchemeColor schemeColor5 = new SchemeColor() { Val = SchemeColorValues.PhColor };
            Shade shade1 = new Shade() { Val = 51000 };
            SaturationModulation saturationModulation4 = new SaturationModulation() { Val = 130000 };

            schemeColor5.Append(shade1);
            schemeColor5.Append(saturationModulation4);

            gradientStop4.Append(schemeColor5);

            GradientStop gradientStop5 = new GradientStop() { Position = 80000 };

            SchemeColor schemeColor6 = new SchemeColor() { Val = SchemeColorValues.PhColor };
            Shade shade2 = new Shade() { Val = 93000 };
            SaturationModulation saturationModulation5 = new SaturationModulation() { Val = 130000 };

            schemeColor6.Append(shade2);
            schemeColor6.Append(saturationModulation5);

            gradientStop5.Append(schemeColor6);

            GradientStop gradientStop6 = new GradientStop() { Position = 100000 };

            SchemeColor schemeColor7 = new SchemeColor() { Val = SchemeColorValues.PhColor };
            Shade shade3 = new Shade() { Val = 94000 };
            SaturationModulation saturationModulation6 = new SaturationModulation() { Val = 135000 };

            schemeColor7.Append(shade3);
            schemeColor7.Append(saturationModulation6);

            gradientStop6.Append(schemeColor7);

            gradientStopList2.Append(gradientStop4);
            gradientStopList2.Append(gradientStop5);
            gradientStopList2.Append(gradientStop6);
            LinearGradientFill linearGradientFill2 = new LinearGradientFill() { Angle = 16200000, Scaled = false };

            gradientFill2.Append(gradientStopList2);
            gradientFill2.Append(linearGradientFill2);

            fillStyleList1.Append(solidFill1);
            fillStyleList1.Append(gradientFill1);
            fillStyleList1.Append(gradientFill2);

            LineStyleList lineStyleList1 = new LineStyleList();

            Outline outline1 = new Outline() { Width = 9525, CapType = LineCapValues.Flat, CompoundLineType = CompoundLineValues.Single, Alignment = PenAlignmentValues.Center };

            SolidFill solidFill2 = new SolidFill();

            SchemeColor schemeColor8 = new SchemeColor() { Val = SchemeColorValues.PhColor };
            Shade shade4 = new Shade() { Val = 95000 };
            SaturationModulation saturationModulation7 = new SaturationModulation() { Val = 105000 };

            schemeColor8.Append(shade4);
            schemeColor8.Append(saturationModulation7);

            solidFill2.Append(schemeColor8);
            PresetDash presetDash1 = new PresetDash() { Val = PresetLineDashValues.Solid };

            outline1.Append(solidFill2);
            outline1.Append(presetDash1);

            Outline outline2 = new Outline() { Width = 25400, CapType = LineCapValues.Flat, CompoundLineType = CompoundLineValues.Single, Alignment = PenAlignmentValues.Center };

            SolidFill solidFill3 = new SolidFill();
            SchemeColor schemeColor9 = new SchemeColor() { Val = SchemeColorValues.PhColor };

            solidFill3.Append(schemeColor9);
            PresetDash presetDash2 = new PresetDash() { Val = PresetLineDashValues.Solid };

            outline2.Append(solidFill3);
            outline2.Append(presetDash2);

            Outline outline3 = new Outline() { Width = 38100, CapType = LineCapValues.Flat, CompoundLineType = CompoundLineValues.Single, Alignment = PenAlignmentValues.Center };

            SolidFill solidFill4 = new SolidFill();
            SchemeColor schemeColor10 = new SchemeColor() { Val = SchemeColorValues.PhColor };

            solidFill4.Append(schemeColor10);
            PresetDash presetDash3 = new PresetDash() { Val = PresetLineDashValues.Solid };

            outline3.Append(solidFill4);
            outline3.Append(presetDash3);

            lineStyleList1.Append(outline1);
            lineStyleList1.Append(outline2);
            lineStyleList1.Append(outline3);

            EffectStyleList effectStyleList1 = new EffectStyleList();

            EffectStyle effectStyle1 = new EffectStyle();

            EffectList effectList1 = new EffectList();

            OuterShadow outerShadow1 = new OuterShadow() { BlurRadius = 40000L, Distance = 20000L, Direction = 5400000, RotateWithShape = false };

            RgbColorModelHex rgbColorModelHex11 = new RgbColorModelHex() { Val = "000000" };
            Alpha alpha1 = new Alpha() { Val = 38000 };

            rgbColorModelHex11.Append(alpha1);

            outerShadow1.Append(rgbColorModelHex11);

            effectList1.Append(outerShadow1);

            effectStyle1.Append(effectList1);

            EffectStyle effectStyle2 = new EffectStyle();

            EffectList effectList2 = new EffectList();

            OuterShadow outerShadow2 = new OuterShadow() { BlurRadius = 40000L, Distance = 23000L, Direction = 5400000, RotateWithShape = false };

            RgbColorModelHex rgbColorModelHex12 = new RgbColorModelHex() { Val = "000000" };
            Alpha alpha2 = new Alpha() { Val = 35000 };

            rgbColorModelHex12.Append(alpha2);

            outerShadow2.Append(rgbColorModelHex12);

            effectList2.Append(outerShadow2);

            effectStyle2.Append(effectList2);

            EffectStyle effectStyle3 = new EffectStyle();

            EffectList effectList3 = new EffectList();

            OuterShadow outerShadow3 = new OuterShadow() { BlurRadius = 40000L, Distance = 23000L, Direction = 5400000, RotateWithShape = false };

            RgbColorModelHex rgbColorModelHex13 = new RgbColorModelHex() { Val = "000000" };
            Alpha alpha3 = new Alpha() { Val = 35000 };

            rgbColorModelHex13.Append(alpha3);

            outerShadow3.Append(rgbColorModelHex13);

            effectList3.Append(outerShadow3);

            Scene3DType scene3DType1 = new Scene3DType();

            Camera camera1 = new Camera() { Preset = PresetCameraValues.OrthographicFront };
            Rotation rotation1 = new Rotation() { Latitude = 0, Longitude = 0, Revolution = 0 };

            camera1.Append(rotation1);

            LightRig lightRig1 = new LightRig() { Rig = LightRigValues.ThreePoints, Direction = LightRigDirectionValues.Top };
            Rotation rotation2 = new Rotation() { Latitude = 0, Longitude = 0, Revolution = 1200000 };

            lightRig1.Append(rotation2);

            scene3DType1.Append(camera1);
            scene3DType1.Append(lightRig1);

            Shape3DType shape3DType1 = new Shape3DType();
            BevelTop bevelTop1 = new BevelTop() { Width = 63500L, Height = 25400L };

            shape3DType1.Append(bevelTop1);

            effectStyle3.Append(effectList3);
            effectStyle3.Append(scene3DType1);
            effectStyle3.Append(shape3DType1);

            effectStyleList1.Append(effectStyle1);
            effectStyleList1.Append(effectStyle2);
            effectStyleList1.Append(effectStyle3);

            BackgroundFillStyleList backgroundFillStyleList1 = new BackgroundFillStyleList();

            SolidFill solidFill5 = new SolidFill();
            SchemeColor schemeColor11 = new SchemeColor() { Val = SchemeColorValues.PhColor };

            solidFill5.Append(schemeColor11);

            GradientFill gradientFill3 = new GradientFill() { RotateWithShape = true };

            GradientStopList gradientStopList3 = new GradientStopList();

            GradientStop gradientStop7 = new GradientStop() { Position = 0 };

            SchemeColor schemeColor12 = new SchemeColor() { Val = SchemeColorValues.PhColor };
            Tint tint4 = new Tint() { Val = 40000 };
            SaturationModulation saturationModulation8 = new SaturationModulation() { Val = 350000 };

            schemeColor12.Append(tint4);
            schemeColor12.Append(saturationModulation8);

            gradientStop7.Append(schemeColor12);

            GradientStop gradientStop8 = new GradientStop() { Position = 40000 };

            SchemeColor schemeColor13 = new SchemeColor() { Val = SchemeColorValues.PhColor };
            Tint tint5 = new Tint() { Val = 45000 };
            Shade shade5 = new Shade() { Val = 99000 };
            SaturationModulation saturationModulation9 = new SaturationModulation() { Val = 350000 };

            schemeColor13.Append(tint5);
            schemeColor13.Append(shade5);
            schemeColor13.Append(saturationModulation9);

            gradientStop8.Append(schemeColor13);

            GradientStop gradientStop9 = new GradientStop() { Position = 100000 };

            SchemeColor schemeColor14 = new SchemeColor() { Val = SchemeColorValues.PhColor };
            Shade shade6 = new Shade() { Val = 20000 };
            SaturationModulation saturationModulation10 = new SaturationModulation() { Val = 255000 };

            schemeColor14.Append(shade6);
            schemeColor14.Append(saturationModulation10);

            gradientStop9.Append(schemeColor14);

            gradientStopList3.Append(gradientStop7);
            gradientStopList3.Append(gradientStop8);
            gradientStopList3.Append(gradientStop9);

            PathGradientFill pathGradientFill1 = new PathGradientFill() { Path = PathShadeValues.Circle };
            FillToRectangle fillToRectangle1 = new FillToRectangle() { Left = 50000, Top = -80000, Right = 50000, Bottom = 180000 };

            pathGradientFill1.Append(fillToRectangle1);

            gradientFill3.Append(gradientStopList3);
            gradientFill3.Append(pathGradientFill1);

            GradientFill gradientFill4 = new GradientFill() { RotateWithShape = true };

            GradientStopList gradientStopList4 = new GradientStopList();

            GradientStop gradientStop10 = new GradientStop() { Position = 0 };

            SchemeColor schemeColor15 = new SchemeColor() { Val = SchemeColorValues.PhColor };
            Tint tint6 = new Tint() { Val = 80000 };
            SaturationModulation saturationModulation11 = new SaturationModulation() { Val = 300000 };

            schemeColor15.Append(tint6);
            schemeColor15.Append(saturationModulation11);

            gradientStop10.Append(schemeColor15);

            GradientStop gradientStop11 = new GradientStop() { Position = 100000 };

            SchemeColor schemeColor16 = new SchemeColor() { Val = SchemeColorValues.PhColor };
            Shade shade7 = new Shade() { Val = 30000 };
            SaturationModulation saturationModulation12 = new SaturationModulation() { Val = 200000 };

            schemeColor16.Append(shade7);
            schemeColor16.Append(saturationModulation12);

            gradientStop11.Append(schemeColor16);

            gradientStopList4.Append(gradientStop10);
            gradientStopList4.Append(gradientStop11);

            PathGradientFill pathGradientFill2 = new PathGradientFill() { Path = PathShadeValues.Circle };
            FillToRectangle fillToRectangle2 = new FillToRectangle() { Left = 50000, Top = 50000, Right = 50000, Bottom = 50000 };

            pathGradientFill2.Append(fillToRectangle2);

            gradientFill4.Append(gradientStopList4);
            gradientFill4.Append(pathGradientFill2);

            backgroundFillStyleList1.Append(solidFill5);
            backgroundFillStyleList1.Append(gradientFill3);
            backgroundFillStyleList1.Append(gradientFill4);

            formatScheme1.Append(fillStyleList1);
            formatScheme1.Append(lineStyleList1);
            formatScheme1.Append(effectStyleList1);
            formatScheme1.Append(backgroundFillStyleList1);

            themeElements1.Append(colorScheme1);
            themeElements1.Append(fontScheme2);
            themeElements1.Append(formatScheme1);
            ObjectDefaults objectDefaults1 = new ObjectDefaults();
            ExtraColorSchemeList extraColorSchemeList1 = new ExtraColorSchemeList();

            theme1.Append(themeElements1);
            theme1.Append(objectDefaults1);
            theme1.Append(extraColorSchemeList1);

            themePart1.Theme = theme1;
        }

        private void SetPackageProperties(OpenXmlPackage document)
        {
            document.PackageProperties.Creator = "Author Name";
            document.PackageProperties.Created = DateTime.Now;
            document.PackageProperties.Modified = DateTime.Now;
            document.PackageProperties.LastModifiedBy = "Author Name";
        }


    }
}
